﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DTO;
using DAL;
namespace BUS
{
    public class HINH_ANHBUS
    {
        public static void Insert(HINH_ANH ha)
        {
            HINH_ANHDAL haDAL = new HINH_ANHDAL();
            haDAL.Insert(ha);
        }
        public static void Delete(int Ma)
        {
            HINH_ANHDAL haDAL = new HINH_ANHDAL();
            haDAL.Delete(Ma);
        }
        public static HINH_ANHCollection GET(string Where, int PageIndex, int PageSize,
                                         string OrderBy, string OrderDirection,
                                         out int TotalRecords)
        {
            HINH_ANHDAL haDAL = new HINH_ANHDAL();
            return haDAL.GET(Where, PageIndex, PageSize, OrderBy, OrderDirection, out TotalRecords);
        }
        public static HINH_ANHCollection GetAll(int ma)
        {
            int t = 0;
            HINH_ANHDAL categoryDAL = new HINH_ANHDAL();
            return categoryDAL.GET("where MA_SP = " + ma.ToString(), 0, 10, HINH_ANHColumns.MA_SP.ToString(), "ASC", out t);
        }
    }
}
